﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using InsertionSort;

namespace Course.Test
{
    [TestClass()]
    public class InsertionSortTestTest
    {
        [TestMethod()]
        public void InsertionSortTest()
        {
            int[] array = { 5, 7, 0, 3, 4, 2, 6, 1 };
            InsertionSortTest_Accessor.InsertionSort(array);
            int[] sortedArray = { 0, 1, 2, 3, 4, 5, 6, 7 };
            for (int i = 0; i < array.Length; i++)
            {
                Assert.AreEqual(array[i], sortedArray[i]);
            }
        }

        [TestMethod()]
        public void InsertionSortShortTest()
        {
            int[] array = { 0 };
            InsertionSortTest_Accessor.InsertionSort(array);
            int[] sortedArray = { 0 };
            for (int i = 0; i < array.Length; i++)
            {
                Assert.AreEqual(array[i], sortedArray[i]);
            }
        }
    }
}